<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Education
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
?>

<div class='layout_right education_view_layout_right'>
  <div class='educations_gutter'>

    <div class="educations_gutter_user">
        <?php echo $this->htmlLink($this->owner->getHref(),
          $this->itemPhoto($this->owner, 'thumb.profile')
        )?>
        <div>
          <?php echo $this->htmlLink($this->owner->getHref(), $this->owner->getTitle()) ?>
          <span><?php echo $this->translate(array('%s education entry','%s education entries', $this->paginator->getTotalItemCount()), $this->paginator->getTotalItemCount()); ?></span>

        </div>
    </div>

  </div>
</div>

<div class='layout_middle education_layout_middle'>
  <div class='education_view'>
    <h2>
      <?php echo $this->translate('%s\'s Educations', $this->owner->__toString())?>
    </h2>
  
    <?php if( $this->paginator->getTotalItemCount() > 0 ): ?>
    
      <ul class='educations_rows'>
        <?php foreach ($this->paginator as $education): ?>
          <li>
            <div class="education_photo">
              <?php echo $this->htmlLink($education->getHref(), $this->itemPhoto($education, 'thumb.normal'));?>
            </div>            
            <div class="education_content">
              <div class="education_title"><h3><?php echo $education->__toString()?></h3></div>
              <div class="education_details">
                <div class="education_details_type">
                  <?php echo $this->translate('School Type: %s', $this->htmlLink($education->getCategory()->getHref(), $this->translate($education->getCategory()->getTitle()))); ?>
                  <?php if ($education->class_year): ?>
                    |
                    <?php echo $this->translate('Class: %s', $education->class_year); ?>
                  <?php endif;?>
                  <?php if ($education->degree): ?>
                    |
                    <?php echo $this->translate('Degree: %s', $education->degree); ?>
                  <?php endif;?>
                </div>
                <?php if ($education->concentration || $education->minor): ?>
                <div class="education_details_focus">
                  <?php if ($education->concentration): ?>
                    <span class="education_concentration"><?php echo $this->translate('Concentrate in %s', $education->concentration); ?></span>
                  <?php endif;?>
                  <?php if ($education->minor): ?>
                    <span class="education_minor"><?php echo $this->translate('with %s minor', $education->minor); ?></span>
                  <?php endif;?>
                </div>
                <?php endif;?>
              </div>
              <div class="education_meta">
                <?php echo $this->translate('Posted on %s', $this->timestamp(strtotime($education->creation_date))) ?></span>
                -
                <?php echo $this->translate(array("%s comment", "%s comments", $education->comment_count), $this->locale()->toNumber($education->comment_count)); ?>
                -
                <?php echo $this->translate(array('%1$s like', '%1$s likes', $education->like_count), $this->locale()->toNumber($education->like_count)); ?>
                -
                <?php echo $this->translate(array('%s view', '%s views', $education->view_count), $this->locale()->toNumber($education->view_count)); ?>
              </div>
              <div class="education_description">
                <?php echo $this->viewMore($education->getDescription()); ?>
              </div>
            </div>
          </li>
        <?php endforeach; ?>  
      </ul>
    <?php else:?>
      <div class="tip">
        <span>
          <?php echo $this->translate('This member has not posted any educations yet.');?>
        </span>
      </div>
    <?php endif; ?>  
  
  </div>
</div>